var headerTemplate = function($) {
	var txt = '\
	<vbox class="${classname}">\
		<hbox flex="1" onclick="CultureMuncher.Workflow.selectStep(\'${id}\', event);" class="wfLineHeader">\
			<hbox flex="1" tooltiptext="${label}" class="wfLineLabel"><label value="${label}" /></hbox> \
			<image src="chrome://culturemuncher/skin/icon_hide.gif" onclick="$(\'#${id}\').toggle();"/>\
		</hbox>\
		<vbox id="${id}" class="wfInner" />\
	</vbox>\
	'.makeXul();
	return $.template(txt);
}

var tableLineTemplate = function($) {
	var txt = '\
	<label value="${label}" onclick="$(\'#${id}\').toggle()" class="tableLineLabel" />\
	<textbox flex="1" value="${text}" ${disabled} onfocus="CultureMuncher_Workflow.setActiveControl(this)" label="${label}"\
		 onchange="CultureMuncher_Workflow.bindControlValue(this);" />\
	<vbox class="extraParameters" id="${id}">\
	<grid>\
	<columns><column/><column flex="1"/></columns>\
    <rows>\
       <row>\
        <label value="Format"/>\
        <textbox value="${format}" label="${label}" onchange="CultureMuncher_Workflow.bindControlValue(this, \'format\');"\
        	 onfocus="CultureMuncher_Workflow.selectStepForActiveSubControl(this)"/>\
      </row>\
      <row>\
        <label value="Parser"/>\
        <textbox value="${parser}" label="${label}" onchange="CultureMuncher_Workflow.bindControlValue(this, \'parser\');"\
        	 onfocus="CultureMuncher_Workflow.selectStepForActiveSubControl(this)"/>\
      </row>\
      <row>\
        <label value="RegEx"/>\
        <textbox value="${regex}" label="${label}" onchange="CultureMuncher_Workflow.bindControlValue(this, \'regex\');"\
        	 onfocus="CultureMuncher_Workflow.selectStepForActiveSubControl(this)"/>\
      </row>\
    </rows>\
    </grid>\
    </vbox>\
    '.makeXul();
	return $.template(txt);
}